<template>
  <div class="conf-item">
    <div class="demo-tabs">
      <div class="top">属性面板</div>
      <div class="bottom">
        <config-tab
          :tabList="list"
          v-model="activeName"
          @item-click="handleItemClick"
        ></config-tab>
        <template v-if="activeName === 'chartset'"><ChartSet /></template>
        <template v-else-if="activeName === 'dataset'"><DataSet /></template>
        <template v-else><EventSet /></template>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from "vue";
import ChartSet from "./chartSet.vue";
import DataSet from "./dataSet.vue";
import EventSet from "./eventSet.vue";
import ConfigTab from "./component/configTab.vue";

let activeName = ref("chartset");
const list = ref([
  { label: "chartset", value: "自定义" },
  { label: "dataset", value: "数据" },
  { label: "eventset", value: "事件" },
]);
const handleItemClick = (item) => {
  activeName.value = item?.label;
};
</script>
<style scoped lang="scss">
.conf-item {
  padding-right: 0;
  height: 100%;
  // color: #0084fe;
  .demo-tabs {
    width: 100%;
    height: 100%;
    overflow: auto;
    .top {
      width: 100%;
      padding: 10px;
      display: flex;
      align-items: center;
      height: 8%;
      font-size: 14px;
      font-weight: bold;
      border-bottom: 1px solid #d9d9d9;
    }
    .bottom {
      width: 100%;
      height: 92%;
      padding: 5px;
    }
  }
  :deep(.hmx-tabs) {
    background-color: #d9d9d9;
    margin-bottom: 10px;
  }
}
::v-deep(.el-tabs__header) {
  border: none;
}
::v-deep(.el-tabs__item) {
  color: #000000;
}
::v-deep(.el-tabs__item.is-active) {
  color: #0084fe;
  background-color: #d3eafe;
}
</style>
